<template>
  <div style="
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    font-family: system-ui;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
  ">
    <h1 style="font-size: 48px; margin: 0 0 20px 0;">🖥️ 桌面调试页面</h1>
    <p style="font-size: 20px; margin: 10px 0;">
      如果你能看到这个页面，说明路由配置正常
    </p>
    
    <div style="
      background: rgba(255, 255, 255, 0.1);
      padding: 30px;
      border-radius: 12px;
      margin-top: 30px;
      max-width: 600px;
    ">
      <h3 style="margin-top: 0;">当前路由信息：</h3>
      <div style="text-align: left; line-height: 1.8;">
        <div><strong>路径:</strong> {{ route.path }}</div>
        <div><strong>名称:</strong> {{ route.name }}</div>
        <div><strong>Meta:</strong> {{ JSON.stringify(route.meta) }}</div>
        <div><strong>完整路径:</strong> {{ route.fullPath }}</div>
      </div>
    </div>

    <div style="margin-top: 30px; display: flex; gap: 20px;">
      <button 
        @click="goToDesktop" 
        style="
          padding: 12px 24px;
          font-size: 16px;
          background: white;
          color: #667eea;
          border: none;
          border-radius: 8px;
          cursor: pointer;
          font-weight: bold;
        "
      >
        跳转到真实桌面
      </button>
      
      <button 
        @click="goDashboard" 
        style="
          padding: 12px 24px;
          font-size: 16px;
          background: rgba(255, 255, 255, 0.2);
          color: white;
          border: 1px solid white;
          border-radius: 8px;
          cursor: pointer;
          font-weight: bold;
        "
      >
        跳转到数据概览
      </button>
    </div>
  </div>
</template>

<script setup>
import { useRoute, useRouter } from 'vue-router'

const route = useRoute()
const router = useRouter()

const goToDesktop = () => {
  router.push('/win10/desktop')
}

const goDashboard = () => {
  router.push('/dashboard')
}

console.log('🔍 调试页面已加载')
console.log('📍 当前路由:', route)
</script>

